package org.awa.demo.opencv.service;

import org.awa.demo.opencv.entity.GeoPolygonBuildEntity;
import org.awa.demo.opencv.entity.GeoPolygonRoadEntity;
import org.awa.demo.opencv.entity.SoundCalBuildLogEntity;
import org.awa.demo.opencv.request.CalBuildRequest;
import org.awa.demo.opencv.request.CalRequest;
import org.awa.demo.opencv.request.TrafficAddRequest;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;

/**
 * @author xxf
 */
public interface IGisService {

//    List<GeoPolygonBuildEntity> importGisBuilding(MultipartFile file) throws Exception;
//
//    List<GeoPolygonRoadEntity> importGisRoad(MultipartFile file) throws Exception;

    void saveGeoPolygonBuildList(List<GeoPolygonBuildEntity> dataList);

    void saveGeoPolygonRoadList(List<GeoPolygonRoadEntity> dataList);

    Map<Integer, SoundCalBuildLogEntity> cal(CalRequest request);

    @Transactional(rollbackFor = Exception.class)
    SoundCalBuildLogEntity calBuild(CalBuildRequest request);

    void addTraffic(TrafficAddRequest request) throws Exception;

    void buildGeoJson(Map<Integer, SoundCalBuildLogEntity> buildLogMap);

    void buildGeoJsonSingle(SoundCalBuildLogEntity entity);
}
